package com.zts.base.exception;

/**
 * Created by Zhangkh on 2017/5/31.
 */
public class CommonExceptionCode {
    //common异常：
    //服务器异常，InternalServerErrorException使用
    //500 INTERNAL SERVER ERROR
    public static final String SERVER_ERROR="common.error.internal_server_error";
    //服务异常，serviceException使用
    //400 INVALID REQUEST 默认错误
    public static final String SERVICE_ERROR="common.error.service_error";
    //未知异常，commonException使用
    //400 INVALID REQUEST 默认错误
    public static final String UNKNOWN_ERROR="common.error.unknown_error";
    //服务不可用  ServiceUnavailableException使用
    //503 SERVICE_UNAVAILABLE
    public static final String SERVICE_UNAVAILABLE="common.error.service_unavailable";


    // SourceIllegalException 请求的资源不合法，内部错误。
    //400 INVALID REQUEST  请求对象错误，服务器内部的。
    public static final String SOURCE_ILLEGAL = "service.error.source_illegal";
    //400 INVALID REQUEST  请求错误
    public static final String BAD_REQUEST = "service.error.bad_request";
    //400 INVALID REQUEST  参数非法
    public static final String PARAM_ILLEGAL = "service.error.param_illegal";
    //400 INVALID REQUEST  未知错误
    public static final String UNSPECIFIED_ERROR = "service.error.unspecified_error";

    //401 Unauthorized 认证失败
    public static final String UNAUTHORIZED_REQUEST = "service.error.unauthorized_request";
    //403 Forbidden  访问被拒绝。（但认证通过\没权限）
    public static final String FORBIDDEN_REQUEST = "service.error.forbidden_request";
    //404 NOT FOUND  未找到
    public static final String SOURCE_NOT_FOUND = "service.error.source_not_found";
    //406 Not Acceptable 请求的资源格式不可得
    public static final String SOURCE_NOT_ACCEPTABLE = "service.error.source_not_acceptable";
    //409 Conflict  冲突
    public static final String SOURCE_CONFLICT = "service.error.source_conflict";
    //410 Gone 资源已被删除
    public static final String SOURCE_GONE = "service.error.source_gone";
    //422 Unprocessable entity  传入对象验证未通过
    public static final String UNPROCESSABLE_ENTITY = "service.error.unprocessable_entity";
}
